package cn.crm.dao;

import cn.crm.pojo.CstCustomer;
import cn.crm.pojo.CstLost;
import cn.crm.pojo.CstService;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CstServiceDao extends BaseMapper<CstService> {
    @Select("SELECT @rownum := @rownum + 1 AS rn,svr_type,COUNT(1) AS `count`\n" +
            "FROM `cst_service`,(SELECT @rownum := 0) r\n" +
            "WHERE svr_type IN(\n" +
            "SELECT svr_type FROM `cst_service`\n" +
            ") GROUP BY svr_type ORDER BY rn;")
    List<CstService> getCount();
}
